Operator CLHSSingleCamera

Operator Library: Hardware Platform

This operator represents the image data interface between a CLHS Single Link configuration camera and VisualApplets. This operator receives data from the CLHS camera and feeds it into the image processing application.

Available for Hardware Platform
marathon VF2

The operator uses one resource of type camera exclusively. You can select port 0 or port 1 of the frame grabber as image source. The same resource ID cannot be used more than once in the applet.

This operator has always one output port O, which is the image output.

Adding Optional GPIO Ports

In addition to this standard output port, you can specify various optional ports if required by your design.

The CLHS protocol supports pulses and GPIO messages.

During instantiation of the operator, a pop-up dialog appears:

Here, you can define the availability of up to 16 optional GPIs (General Purpose Inputs) and up to 16 optional GPOs (General Purpose Outputs).

If you set the port availability to "0" (default), the port will not be present in the operator. If you set the port availability to 1, the particular port is available at the operator interface.

The GPIO state is transferred when the state of a GPI is changed by a connected operator. When the operator receives a GPIO message from the camera, all GPOs are updated.

Parameter Bit Width

Link parameter Bit Width can be set to a value higher or lower than the bit width the camera is actually sending:

  • If you select a lower value, the LSB bits of each pixel are cut off, so that only the MSB bits are transferred into the application.
  • If you select a higher value, the original pixel is set to the MSB position of the outgoing pixel. The LSB bits are filled with zeros.

In both cases, the relative brightness remains the same, i.e., white pixels remain white and dark pixels remain dark.

Adding Optional Output Ports

In addition, you can (optionally) activate two additional output ports:

  • one output port Output (SyncO) (MultiFGSync bit of video message), and
  • one output port Output (HeaderO). Output (HeaderO) provides the header information of the video package that is currently worked on. The port provides the header information in a pixel of a width of 64 bit.

The Structure of Output Port HeaderO

Before the image data are output on output port O, one single pixel is output on port HeaderO. This pixel contains the data of the header of the video package. Output port HeaderO is used to transfer information about more complex dependencies of the incoming data, or to react to events via the video link of the applet.

The structure of output port HeaderO is as follows:

Position CLHS Header Description
[0,2] ColorID [0,2] Video Source: At the moment this part is always 0
[3,4] ColorID [3,4] Packet Type 0 = video (all other combinations are reserved)
[5,7] ColorID [5,7] Color ID:
ColorID Description
0 Mono, Multi-component, Bayer, Raw
1 Blue
2 Green
3 Red
4 Alpha
(5..7) reserved
[8,9] VideoStatus [1,0] Row Marker:
Bits Description
00 Continuation of Row
01 Start of Row
10 End of Row
11 Complete row (start & end)
[10,11] VideoStatus [3,2] Frame Marker:
Bits Description
00 Continuation of Frame
01 Start of Frame
10 End of Frame
11 Complete Frame (start & end)
12 VideoStatus [4] Missed Trigger. Camera was not able to react to a trigger request since last package
13 VideoStatus [5] Buffer overflow in Camera
14 VideoStatus [6] MultiFGSync Synchronisation for multi FG usage(see also SyncO output)
15 VideoStatus [7] Resend Flag, set to 0, not used
[16,31] RowID Number of the current Row
[32,39] - Reserved, set to 0
[40,55] ColID Number of the Column of the first pixel in this package
[56,63] AcquisitionSet This Byte may be used by the camera to set proprietary information

I/O Properties

Property Value
Operator Type M
Output Links O, Acquisition image data to be used inside VisualApplets
GPO[0;15] (optional), Status of the Camera GPOs (Exchange via CLHS)
GPI[0;15] (optional), Status of the Framegrabber GPOs (Exchange via CLHS)
SyncO (optional), MultiFGSync Bit is set in Video Package (valid for 1 clock cycle)
HeaderO (optional), One 64 bit wide Pixel at the start of each video package containing the video package header

Supported Link Format

Link Parameter Output Link O Output Link GPO[0;15] (optional) Output Link GPI[0;15] (optional) Output Link SyncO (optional) Output Link HeaderO (optional)
Bit Width any 1 1 1 64
Arithmetic unsigned unsigned unsigned unsigned unsigned
Parallelism any, see parameter description 1 1 1 1
Kernel Columns 1 1 1 1 1
Kernel Rows 1 1 1 1 1
Img Protocol {VALT_IMAGE2D, VALT_LINE1D} VALT_SIGNAL VALT_SIGNAL VALT_SIGNAL VALT_Pixel0D
Color Format VAF_GRAY VAF_GRAY VAF_GRAY VAF_GRAY VAF_GRAY
Color Flavor FL_NONE FL_NONE FL_NONE FL_NONE FL_NONE
Max. Img Width any 1 1 1 1
Max. Img Height any 1 1 1 1

Parameters

CameraID
Type static write parameter
Default 0
Range {0, 1}

The parameter specifies which camera resource is used. Furthermore, the ID will be used to map camera channels to applet ports.

PixelFormat
Type static write parameter
Default Mono10p
Range {Mono8,Mono10p,Mono12p,Mono14p,Mono16,Raw8,Raw10p,Raw12p,Raw14p,Raw16, Raw64, B8, B10p, B12p, B14p, B16, G8, G10p, G12p, G14p, G16, R8, R10p, R12p, R14p, R16, BGR8, BGR10p, BGR12p, BGR14p, BGR16, BGRa8, BGRa10p, BGRa12p, BGRa14p, BGRa16, BayerGR8, BayerGR10p, BayerGR12p,BayerGR14p, BayerGR16, BayerRG8, BayerRG10p, BayerRG12p, BayerRG14p, BayerRG16, BayerGB8, BayerGB10p, BayerGB12p, BayerGB14p, BayerGB16, BayerBG8, BayerBG10p, BayerBG12p, BayerBG14p, BayerBG16}

The parameter specifies the output pixel format.

In RAW mode, all line and frame markers coming in from the camera will be ignored. RAW mode is used to support complex link structures and is exclusively available in operator CLHSSingleCamera.

AquisitionFormat
Type static write parameter
Default Area
Range {Area; Linescan; RAW}

When this parameter is set to "Area", the first data available is a complete frame. Frames started in the middle will be ignored. Therefore, a "Start Of Frame" marker in the first video message is required.

When this parameter is set to "Line", the first data available is a complete line. Lines started in the middle will be ignored. Therefore, a "Start Of Line" marker in the first video message is required. "Start of Frame" and "End of Frame" will be ignored, since they are set to 0 for linescan cameras.

When this parameter is set to “RAW”, all markers will be ignored ("Start/End of Line" as well as "Start/End of Frame"). "RAW" mode is used to support complex link structures. This mode is only available in the CLHSSingleCamera operator.

LineSupervision
Type dynamic/static read/write parameter
Default off
Range {on, off}

If this parameter is set to "on", the operator monitors if all lines incoming from the camera are transferred to the applet.

The lines comming in from the camera are numbered in ascending order (line 0, line 1, line 2 ... line N). The parameter makes sure that no lines are lost. For example, if a camera with one link is connected and the parameter monitors a sequence like 332, 333, 335, 336 …, an error is thrown.

If a camera has more than 1 link the step size for incoming lines per link can be increased using parameter RowStep accordingly. For example, if a camera has 2 links, link 0 receives lines 0, 2, 4, 6, … , and link 1 receives lines 1, 3, 5, 7 … etc. Accordingly, if a camera has 4 links, link 0 receives lines 0, 4, 8, 12, … , link 1 receives lines 1, 5, 9, 13, link 2 receives lines 2, 6, 10, 14, … etc.

Furthermore, parameter LineSupervision checks for integrity: Start of line (SoL) and End of Line (EoL) must be in the correct order. Missing EoL or SoL will be detected, an error flag is generated and an End of Line is inserted. Missing Lines will be inserted as smaller lines (length depends on parallelism and bitwidth) until 2 following RowIDs are detected and line consistency is guaranteed again.

RowStep
Type dynamic/static read/write parameter
Default 1
Range {1, 65535}

Step between 2 RowIDs. Should be 1 unless a multi-channel camera is used and lines are split amongst links.

SyncFirstLineToFGSyncRequest
Type dynamic/static read/write parameter
Default no
Range {no,yes}

If this parameter is set to yes, all lines before the first FGSyncRequest are discarded. Works only in LINE_1D mode. This synchronizes the first line with the first external FGSyncRequest pulse.

MinimalParallelism
Type static read parameter
Default 2
Range [1; 1024]

Minimal parallelism for the output link O to be able to transport the maximal bandwidth of the camera without losing data. This value depends on the currently selected design clock frequency. The higher the frequency the lower the parallelism value can become.